package cn.yh.springbootjwt.controller;

import cn.yh.springbootjwt.common.AjaxResult;
import cn.yh.springbootjwt.common.TableDataInfo;
import cn.yh.springbootjwt.controller.base.BaseController;
import cn.yh.springbootjwt.domain.query.PageQuery;
import cn.yh.springbootjwt.domain.vo.CategoryListVo;
import cn.yh.springbootjwt.domain.vo.ProductCategoryVo;
import cn.yh.springbootjwt.service.ICategoryService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/category")
@Api(tags = "商品分类管理")
public class CategoryController extends BaseController {
    @Autowired
    private ICategoryService categoryService;

    @GetMapping("/list")
    @ApiOperation("商品分类列表接口")
    public AjaxResult<CategoryListVo> findAllCategory(){
        return AjaxResult.success(categoryService.findAllCategory());
    }



}
